{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "A = [[1,2,3],[4,5,6],[7,8,9]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[1, 4, 7], [2, 5, 8], [3, 6, 9]]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[list(row) for row in zip(*A)]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "https://leetcode.com/problems/transpose-matrix\n",
    "\n",
    "\n",
    "Runtime: 64 ms, faster than 97.04% of Python3 online submissions for Transpose Matrix.\n",
    "Memory Usage: 14.7 MB, less than 87.47% of Python3 online submissions for Transpose Matrix.\n",
    "\n",
    "\n",
    "```python\n",
    "class Solution:\n",
    "    def transpose(self, A: List[List[int]]) -> List[List[int]]:\n",
    "        #7:15\n",
    "        return [list(row) for row in zip(*A)]\n",
    "```\n",
    "\n",
    "\n",
    "\n",
    "Spent 5 minutes."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
